package com.ldp.designpatterns.study.adapter.InterfaceAdapter;

import com.ldp.designpatterns.study.adapter.ClassAdapter.adaptee.ChineseStandard;
import com.ldp.designpatterns.study.adapter.InterfaceAdapter.client.Client;
import com.ldp.designpatterns.study.adapter.InterfaceAdapter.target.StandardAdapter;

/**
 * @ClassName AdapterTest
 * @Description
 *  适配器三：接口适配器代码——可先设计一个抽象类实现接口，并为该接口中每个方法提供一个默认实现（空方法），那么该抽象类的子类可有选择地覆盖父类的某些方法来实现需求
 * @Author lindipei
 * @Date 2023/10/16 14:15
 */
public class AdapterTest {
    public static void main(String[] args) {
        StandardAdapter standardAdapter = new StandardAdapter(){

            @Override
            public String getBritishStandard() {
                return new ChineseStandard().getChineseStandard();
            }
        };
        new Client().charge(standardAdapter);

    }
}
